package metrics

//
//import (
//	"fmt"
//	"github.com/prometheus/client_golang/prometheus"
//	"time"
//)
//
//const (
//	MetricsNamespace = "httpserver0"
//)
//
//func NewTimer() *ExecutionTimer {
//	return NewExecutionTimer(functionLatency)
//}
//
//var (
//	functionLatency = CreateExecutionTimeMetric(MetricsNamespace,
//		"Time spent.")
//)
//
//func NewExecutionTimer(histo *prometheus.HistogramVec) *ExecutionTimer {
//	now := time.Now()
//	return &ExecutionTimer{
//		histo: histo,
//		start: now,
//		last:  now,
//	}
//}
//
//type ExecutionTimer struct {
//	histo *prometheus.HistogramVec
//	start time.Time
//	last  time.Time
//}
//
//func Register() {
//	err := prometheus.Register(functionLatency)
//	if err != nil {
//		fmt.Println(err)
//	}
//}
//
//func CreateExecutionTimeMetric(namespace string, help string) *prometheus.HistogramVec {
//	return prometheus.NewHistogramVec(
//		prometheus.HistogramOpts{
//			Namespace: namespace,
//			Name:      "execution_latency_seconds",
//			Help:      help,
//			Buckets:   prometheus.ExponentialBuckets(0.001, 2, 15),
//		}, []string{"step"},
//	)
//}
//
//func (t *ExecutionTimer) ObserveTotal() {
//	(*t.histo).WithLabelValues("total").Observe(time.Now().Sub(t.start).Seconds())
//}
